#ifndef __MODULE_H__
#define __MODULE_H__

#include <memory>

namespace johnsonli
{
    class Module
    {
    public:
        typedef std::shared_ptr<Module> ptr;

        Module(const std::string& name);
        virtual ~Module() {}
        
        virtual bool onLoad() = 0;
        virtual bool onUnload() = 0;
        virtual bool onServerReady() = 0;
        virtual bool onServerUp() = 0;


        std::string getName() const { return m_name; }  
        void setName(const std::string& name) { m_name = name; }
    private:
        std::string m_name = "default_module";
    };
}


#endif
